using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace MvcApplication4.Models.Mapping
{
    public class tb_LaboratorioMap : EntityTypeConfiguration<tb_Laboratorio>
    {
        public tb_LaboratorioMap()
        {
            // Primary Key
            this.HasKey(t => t.ID_Laboratorio);

            // Properties
            this.Property(t => t.Nome_Laboratorio)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("tb_Laboratorio");
            this.Property(t => t.ID_Laboratorio).HasColumnName("ID_Laboratorio");
            this.Property(t => t.Nome_Laboratorio).HasColumnName("Nome_Laboratorio");
        }
    }
}
